import Layout from 'com/layout/index.vue'

export const routes= [
  {
    path: '/',
    redirect: '/login'
  },
  {
    path: '/login',
    name: 'login',
    meta: { title: "登录" , requireAuth: false},
    component: () => import('views/login/index.vue')
  },
  {
    path: '/home',
    name: 'home',
    icon:'AddLocation',
    hidden: true,
    meta: { title: "首页" , requireAuth: true },
    component: Layout,
    redirect: '/home/index',
    children: [
      {
        path: "index",
        name: "homeindex",
        icon:'Aim',
        hidden: true,
        meta: { title: "首页", requireAuth: true },
        component: () => import('views/home/index.vue'),
      }
    ]
  },
  {
    path: '/system',
    name: 'system',
    icon:'AlarmClock',
    hidden: true,
    meta: { title: "系统管理" ,requireAuth: true},
    component: Layout,
    children: [
      {
        path: "role",
        name: "systemrole",
        icon:'Apple',
        hidden: true,
        meta: { title: "角色管理", requireAuth: true },
        component: () => import('views/system/role/index.vue'),
      },
      {
        path: "menu",
        name: "systemmenu",
        icon:'ArrowDownBold',
        hidden: true,
        meta: { title: "菜单管理", requireAuth: true },
        component: () => import('views/system/menu/index.vue'),
      },
    ]
  },
  {
    path: "/:chapters+",
    name: "*",
    meta: { title: "404" ,requireAuth: false},
    component: () => import('views/404Not/index.vue')
  },
]
// hidden= true 表示当前路由显示给用户  其他不展示
// requireAuth false 路由展示时不展示 true 展示